import Ember from 'ember';

export default Ember.Component.extend({
  level: Ember.computed.alias("model.level"),
  actions: {
    valueUp() {
      var max = this.get('max'),
          level = this.get('level');
      if (level < max) {
        this.incrementProperty('level');
      }
    },
    valueDown() {
      var min = this.get('min'),
          level = this.get('level');

      if (level > min) {
        this.decrementProperty('level');
      }
    }
  }
});
